﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public class NguoiDungBUS
    {
        public static Boolean KiemTraDangNhap(String user, String pass)
        {
            if (user == "" || pass == "")
                return false;
            return true;
        }
        public static NguoiDungDTO DangNhap(String user, String pass)
        {
            return NguoiDungDAO.DangNhap(user, pass);

        }
        public static int KiemTraDoiMatKhau(String pass1, String pass2, String pass3, String pass4)
        {
            if (pass1 != pass2)
                return 1;
            if (pass3 != pass4)
                return 2;
            if (pass2 == pass3)
                return 3;
            return 0;
        }
        public static Boolean DoiMatKhau(String user, String pass)
        {
            return NguoiDungDAO.DoiMatKhau(user, pass);
        }
    }

}
